var express = require('express');
var router = express.Router();
var request = require('request');
var md5 = require('md5');
var consts = require('../common/constants');

/* GET home page. */
router.get('/', function(req, res, next) {
  var name = req.cookies.name;
  if(name!=null&&name!=undefined){
  res.render('index', { 
  	title: '首页',
  	name:name,
  });
  }
  else{
  	res.render('login', { title: '登录', });
  }

});

module.exports = router;
